{* Extend our master template *}
{extends file="master.tpl"}

{* This block is defined in the master.php template *}
{block name=content}
    <div class="row">
        <div class="col-md-12">
            <form id="form" class="form-horizontal" method="post">
                <div class="panel panel-default">
                    {include file="components/panel_heading.tpl" title=$title sub_title=$sub_title}
                    <div class="panel-body">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_type'|trans} <span class="asterisk">*</span></label>
                            <div class="col-sm-3">
                                <select name="type" id="type" class="select2" required>
                                    {foreach from=$types item=type}
                                        <option value="{$type['id']}" {if $info['type'] == $type['id']}selected="selected"{/if}>{$type['type']}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="form-group" id="field_catalogue">
                            <label class="col-sm-3 control-label">{'title_catalogue'|trans} <span class="asterisk">*</span></label>
                            <div class="col-sm-3">
                                <select name="cata_id" id="catalogue" class="select2" required>
                                    {foreach from=$catalogues item=cata}
                                        <option value="{$cata['cata_id']}" {if $info['cata_id'] == $cata['cata_id']}selected="selected"{/if}>{$cata['cata_name']}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_url_parent'|trans}</label>
                            <div class="col-sm-3">
                                <select name="parent_id" id="parent" class="select2">
                                    <option></option>
                                    {foreach from=$parents item=pa}
                                        <option value="{$pa['id']}" {if $info['parent_id'] == $pa['id']}selected="selected"{/if}>{$pa['url_routes']}</option>
                                    {/foreach}
                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title'|trans} <span class="asterisk">*</span></label>
                            <div class="col-sm-9">
                                <input type="text" name="title" id="title" value="{$info['title']}" class="form-control" placeholder="Type your title..." required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_url_retail'|trans} <span class="asterisk">*</span></label>
                            <div class="col-sm-9">
                                <input type="text" name="url_retail" id="url_retail" value="{$info['url_retail']}" class="form-control" placeholder="Type your url retail..." required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_url_retail'|trans} <span class="asterisk">*</span></label>
                            <div class="col-sm-9">
                                <input type="text" name="url_routes" id="url_routes" value="{$info['url_routes']}" class="form-control" placeholder="Type your url routes..." required>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_keyword'|trans}</label>
                            <div class="col-sm-9">
                                <textarea name="keywords" class="form-control">{$info['keywords']}</textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_description'|trans}</label>
                            <div class="col-sm-9">
                                <textarea name="description" class="form-control">{$info['description']}</textarea>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_custom'|trans}</label>
                            <div class="col-sm-9">
                                <div class="ckbox ckbox-primary">
                                  <input type="checkbox" id="home_menu" value="1" name="home_menu" {if $info['home_menu']}checked="checked"{/if} />
                                  <label for="home_menu">{'title_home_menu'|trans}</label>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">{'title_order_url'|trans}</label>
                            <div class="col-sm-1">
                                <input type="number" name="order" value="{$info['order']}" class="form-control" placeholder="Order...">
                            </div>
                        </div>

                    </div><!-- panel-body -->
                    {include file="components/panel_footer.tpl"}
                </div><!-- panel -->
            </form>
        </div>
    </div>
{/block}